#define _CRT_SECURE_NO_WARNINGS 1
#include "string1.h"
namespace zkf
{
	void test1()
	{
		string s1("hello world");
		cout <<s1.tou() << endl;
		s1[4] = 'w';
		cout << s1.tou() << endl;
		s1.push_back('k');
		s1.push_back('s');
		cout << s1.tou() << endl;
		s1 += "zkfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
		cout << s1.tou() << endl;
		s1.insert(0, 'a');
		s1 += 'f';
		cout << s1.tou() << endl;
		string s2("hello world");
		s2.insert(5, "kfc");
		cout << s2.tou() << endl;
		string s3("hello world");
		s3.erase(4, 3);
		cout << s3.tou() << endl;
	}
	void test2()
	{
		string s1("hello world");
		string s2 = s1;
		cout << s2.tou() << endl;
		string s3("xxxxxxxxxxxxxxx");
		s2 = s3;
		cout << s2.tou() << endl;
		size_t a=s1.find("world", 3);
		cout << a << endl;
		string s4("qwefqwefrrgtwfg qfdq qf ef erferer");
		string as= s4.substr(5);
		cout << as.tou() << endl;

	}
	void test3()
	{
		string s1("ahfuehfie");
		string s2("ahfuehfie");
		cout<<(s1 >= s2)<<endl;
		string s3("aqdqwe");
		cin >> s3;
		cout << s3;
	}
}

int main()
{
	zkf::test1();
	zkf::test2();
	zkf::test3();
	return 0;
}